//
//  PictureCollectionViewCell.m
//  Funny
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 King. All rights reserved.
//

#import "PictureCollectionViewCell.h"

@implementation PictureCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.bgImageView = [[UIImageView alloc]init];
        self.bgImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.contentView addSubview:_bgImageView];
        
        self.nameLable = [[UILabel alloc]init];
        self.nameLable.backgroundColor = [UIColor blackColor];
        self.nameLable.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_nameLable];
    }
    return self;
}


- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _bgImageView.frame = CGRectMake(0, 50, self.contentView.bounds.size.width, self.contentView.bounds.size.height -200);
    _nameLable.frame  = CGRectMake(10, self.contentView.bounds.size.height-40, 300, 30);
}
@end
